package cn.itsource.feign.client;

import cn.itsource.doc.CourseDoc;
import cn.itsource.feign.fallback.CourseFeignClientFallback;
import cn.itsource.result.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @Author: Jason
 * @Date: 2022/9/4 18:48
 */
//搜索服务的Feign接口
@FeignClient(value = "service-es", fallbackFactory = CourseFeignClientFallback.class)
public interface CourseFeignClient {

    //需要上线的课程信息存ES
    @PostMapping("/es/course/saveCourse")
     JSONResult saveCourse(@RequestBody List<CourseDoc> doc);
}